/**   
 * Copyright © 2016 公司名. All rights reserved.
 * 
 * @Title: NoticeRestController.java 
 * @Prject: LianniuWeb
 * @Package: com.lianniu.web.baseService.notice.controller
 * @Description: TODO
 * @author: lzz   
 * @date: 2016年8月8日 下午3:17:17 
 * @version: V1.0   
 */
package com.lianniu.web.baseService.notice.controller;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianniu.web.baseService.notice.service.INoticeService;
import com.lianniu.web.base.BaseResult;
import com.lianniu.web.baseService.notice.model.NoticeVo;
import com.lianniu.web.pagination.PaginationInfo;

/** 
 * @ClassName: NoticeRestController 
 * @Description: TODO
 * @author: lzz
 * @date: 2016年8月8日 下午3:17:17  
 */
@Controller
@RequestMapping("rest")
public class NoticeRestController {
    
    private final static Logger logger = Logger.getLogger(NoticeController.class);
    
    @Resource
    private INoticeService noticeService;
    @RequestMapping(value={"getNoticeList"},method=RequestMethod.POST)
    public @ResponseBody BaseResult getNoticeList(NoticeVo noticeVo,PaginationInfo paginationInfo){
        logger.info("NoticeRestController getNoticeList begin");
        BaseResult result = noticeService.getNoticeList(noticeVo, paginationInfo);
        logger.info("NoticeRestController getNoticeList end");
        return result;
    }
    @RequestMapping(value={"seeNotice"},method=RequestMethod.POST)
    public @ResponseBody BaseResult seeNotice(@RequestParam("noticeId") long noticeId,@RequestParam("userId") long userId){
        logger.info("NoticeRestController seeNotice begin");
        BaseResult result = noticeService.seeNotice(noticeId, userId);
        logger.info("NoticeRestController seeNotice end");
        return result;
    }
}
